package 数据结构.树.线段树;

import org.junit.Test;

/**
 * @author Veng Su 1344114844@qq.com
 * @date 2018/7/26 13:48
 */
public class Main {
    @Test
    public void test1(){
        Integer [] num={1,31,123,412,134,12344,0};
        SegmentTree<Integer> segmentTree=new SegmentTree<>(num,(x,y)-> x+y);
        System.out.println(segmentTree);
        System.out.println(segmentTree.query(0,2));
    }
}
